home *** CD-ROM | disk | FTP | other *** search
- unit uXMLContactSync;
-
- {
- *******************************************************************************
- * Descriptions: Automaticly Generated Unit for the XMLFmaSync DOM
- * $Source: /cvsroot/fma/fma/uXMLContactSync.pas,v $
- * $Locker: $
- *
- * Change Log:
- * $Log: uXMLContactSync.pas,v $
- * Revision 1.3 2004/06/25 18:27:09 lordlarry
- * Added this changelog header
- *
- *
- }
-
- interface
-
- uses xmldom, XMLDoc, XMLIntf;
-
- type
-
- { Forward Decls }
-
- IXMLFmaSyncType = interface;
- IXMLContactType = interface;
- IXMLFMAType = interface;
- IXMLExternType = interface;
-
- { IXMLFmaSyncType }
-
- IXMLFmaSyncType = interface(IXMLNodeCollection)
- ['{CA4B2EEA-C70C-4AB6-B679-E9D7DD9122B9}']
- { Property Accessors }
- function Get_Contact(Index: Integer): IXMLContactType;
- { Methods & Properties }
- function Add: IXMLContactType;
- function Insert(const Index: Integer): IXMLContactType;
- property Contact[Index: Integer]: IXMLContactType read Get_Contact; default;
- end;
-
- { IXMLContactType }
-
- IXMLContactType = interface(IXMLNode)
- ['{5A2C5693-BE46-49BE-BA70-FC2AEBD2399A}']
- { Property Accessors }
- function Get_SyncID: Integer;
- function Get_FMA: IXMLFMAType;
- function Get_Extern: IXMLExternType;
- procedure Set_SyncID(Value: Integer);
- { Methods & Properties }
- property SyncID: Integer read Get_SyncID write Set_SyncID;
- property FMA: IXMLFMAType read Get_FMA;
- property Extern: IXMLExternType read Get_Extern;
- end;
-
- { IXMLFMAType }
-
- IXMLFMAType = interface(IXMLNode)
- ['{622B347A-E707-4BD1-9A40-249C4BC27DBA}']
- { Property Accessors }
- function Get_ID: Variant;
- function Get_Hash: WideString;
- procedure Set_ID(Value: Variant);
- procedure Set_Hash(Value: WideString);
- { Methods & Properties }
- property ID: Variant read Get_ID write Set_ID;
- property Hash: WideString read Get_Hash write Set_Hash;
- end;
-
- { IXMLExternType }
-
- IXMLExternType = interface(IXMLNode)
- ['{8F521746-8EE0-44B2-903D-9B7B038CE01C}']
- { Property Accessors }
- function Get_ID: Variant;
- function Get_Hash: WideString;
- procedure Set_ID(Value: Variant);
- procedure Set_Hash(Value: WideString);
- { Methods & Properties }
- property ID: Variant read Get_ID write Set_ID;
- property Hash: WideString read Get_Hash write Set_Hash;
- end;
-
- { Forward Decls }
-
- TXMLFmasyncType = class;
- TXMLContactType = class;
- TXMLFMAType = class;
- TXMLExternType = class;
-
- { TXMLFmasyncType }
-
- TXMLFmasyncType = class(TXMLNodeCollection, IXMLFmaSyncType)
- protected
- { IXMLFmaSyncType }
- function Get_Contact(Index: Integer): IXMLContactType;
- function Add: IXMLContactType;
- function Insert(const Index: Integer): IXMLContactType;
- public
- procedure AfterConstruction; override;
- end;
-
- { TXMLContactType }
-
- TXMLContactType = class(TXMLNode, IXMLContactType)
- protected
- { IXMLContactType }
- function Get_SyncID: Integer;
- function Get_FMA: IXMLFMAType;
- function Get_Extern: IXMLExternType;
- procedure Set_SyncID(Value: Integer);
- public
- procedure AfterConstruction; override;
- end;
-
- { TXMLFMAType }
-
- TXMLFMAType = class(TXMLNode, IXMLFMAType)
- protected
- { IXMLFMAType }
- function Get_ID: Variant;
- function Get_Hash: WideString;
- procedure Set_ID(Value: Variant);
- procedure Set_Hash(Value: WideString);
- end;
-
- { TXMLExternType }
-
- TXMLExternType = class(TXMLNode, IXMLExternType)
- protected
- { IXMLExternType }
- function Get_ID: Variant;
- function Get_Hash: WideString;
- procedure Set_ID(Value: Variant);
- procedure Set_Hash(Value: WideString);
- end;
-
- { Global Functions }
-
- function Getfmasync(Doc: IXMLDocument): IXMLFmaSyncType;
- function Loadfmasync(const FileName: WideString): IXMLFmaSyncType;
- function Newfmasync: IXMLFmaSyncType;
-
- const
- TargetNamespace = '';
-
- implementation
-
- { Global Functions }
-
- function Getfmasync(Doc: IXMLDocument): IXMLFmaSyncType;
- begin
- Result := Doc.GetDocBinding('fmasync', TXMLFmasyncType, TargetNamespace) as IXMLFmaSyncType;
- end;
-
- function Loadfmasync(const FileName: WideString): IXMLFmaSyncType;
- begin
- Result := LoadXMLDocument(FileName).GetDocBinding('fmasync', TXMLFmasyncType, TargetNamespace) as IXMLFmaSyncType;
- end;
-
- function Newfmasync: IXMLFmaSyncType;
- begin
- Result := NewXMLDocument.GetDocBinding('fmasync', TXMLFmasyncType, TargetNamespace) as IXMLFmaSyncType;
- end;
-
- { TXMLFmasyncType }
-
- procedure TXMLFmasyncType.AfterConstruction;
- begin
- RegisterChildNode('contact', TXMLContactType);
- ItemTag := 'contact';
- ItemInterface := IXMLContactType;
- inherited;
- end;
-
- function TXMLFmasyncType.Get_Contact(Index: Integer): IXMLContactType;
- begin
- Result := List[Index] as IXMLContactType;
- end;
-
- function TXMLFmasyncType.Add: IXMLContactType;
- begin
- Result := AddItem(-1) as IXMLContactType;
- end;
-
- function TXMLFmasyncType.Insert(const Index: Integer): IXMLContactType;
- begin
- Result := AddItem(Index) as IXMLContactType;
- end;
-
- { TXMLContactType }
-
- procedure TXMLContactType.AfterConstruction;
- begin
- RegisterChildNode('fma', TXMLFMAType);
- RegisterChildNode('extern', TXMLExternType);
- inherited;
- end;
-
- function TXMLContactType.Get_SyncID: Integer;
- begin
- Result := AttributeNodes['syncid'].NodeValue;
- end;
-
- procedure TXMLContactType.Set_SyncID(Value: Integer);
- begin
- SetAttribute('syncid', Value);
- end;
-
- function TXMLContactType.Get_FMA: IXMLFMAType;
- begin
- Result := ChildNodes['fma'] as IXMLFMAType;
- end;
-
- function TXMLContactType.Get_Extern: IXMLExternType;
- begin
- Result := ChildNodes['extern'] as IXMLExternType;
- end;
-
- { TXMLFMAType }
-
- function TXMLFMAType.Get_ID: Variant;
- begin
- Result := AttributeNodes['id'].NodeValue;
- end;
-
- procedure TXMLFMAType.Set_ID(Value: Variant);
- begin
- SetAttribute('id', Value);
- end;
-
- function TXMLFMAType.Get_Hash: WideString;
- begin
- Result := AttributeNodes['hash'].Text;
- end;
-
- procedure TXMLFMAType.Set_Hash(Value: WideString);
- begin
- SetAttribute('hash', Value);
- end;
-
- { TXMLExternType }
-
- function TXMLExternType.Get_ID: Variant;
- begin
- Result := AttributeNodes['id'].NodeValue;
- end;
-
- procedure TXMLExternType.Set_ID(Value: Variant);
- begin
- SetAttribute('id', Value);
- end;
-
- function TXMLExternType.Get_Hash: WideString;
- begin
- Result := AttributeNodes['hash'].Text;
- end;
-
- procedure TXMLExternType.Set_Hash(Value: WideString);
- begin
- SetAttribute('hash', Value);
- end;
-
- end.